package com.googlecode.maurersmarbles;

public class DoublePlay implements Play {

	/**
	 * The first play.
	 */
	protected SinglePlay play1;
	/**
	 * The second play.
	 */
	protected SinglePlay play2;
	
	/**
	 * Creates a new DoublePlay.
	 * @param play1 the first play
	 * @param play2 the second play
	 */
	public DoublePlay(SinglePlay play1, SinglePlay play2) {
		this.play1 = play1;
		this.play2 = play2;
	}
	
	@Override
	public String toString() {
		if(play1 != null && play2 != null) {
			return "Card: " + (play1.card != null ? play1.card.getValue() : "null") + ", Player A: " + play1.player + ", Marble A: " + play1.marble + ", New Index A: " + play1.newIndex + ", Player B: " + play2.player + ", Marble B: " + play2.marble + ", New Index B: " + play2.newIndex;	
		}
		return "Null play";		
	}
	
}
